﻿<UserControl x:Class="MatchResults.View.LiveResultView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:src="clr-namespace:MatchResults.ViewModel"
    mc:Ignorable="d"
     FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="480" d:DesignWidth="480">

    <Grid x:Name="LayoutRoot" Background="Transparent">

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel Orientation="Vertical" >
            <TextBlock HorizontalAlignment="Left"   Name="txtLoading" Text="Yükleniyor..." Width="111" Foreground="Black" FontSize="22" />
            <ProgressBar IsIndeterminate="True"  HorizontalAlignment="Left"   Name="prgssLoading" Width="383"  />

        </StackPanel>
        <Grid x:Name="ContentPanel" Grid.Row="1" >
            <Grid.RowDefinitions>
                <RowDefinition Height="30"></RowDefinition>
                <RowDefinition></RowDefinition>
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="50"  />
                        <ColumnDefinition Width="200" />
                        <ColumnDefinition Width="65" />
                        <ColumnDefinition Width="65" />
                        <ColumnDefinition Width="65" />
                    </Grid.ColumnDefinitions>
                    <TextBlock Text="Lig" Grid.Column="0" HorizontalAlignment="Center"/>
                    <TextBlock Text="Takımlar" Grid.Column="1" HorizontalAlignment="Center"/>
                    <TextBlock Text="İ.Y" Grid.Column="2" HorizontalAlignment="Center"/>
                    <TextBlock Text="M.S" Grid.Column="3" HorizontalAlignment="Center"/>
                    <TextBlock Text="Dakika" Grid.Column="4" HorizontalAlignment="Center"/>
                </Grid>
            </StackPanel>
            <ListBox x:Name="grdMatchResult" Grid.Row="1">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Grid Background="{Binding Path=BackgroundColor}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="50"  />
                                <ColumnDefinition Width="200" />
                                <ColumnDefinition Width="65" />
                                <ColumnDefinition Width="65" />
                                <ColumnDefinition Width="65" />
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Path=Lig}"  Grid.Column="0" />
                            <TextBlock  TextWrapping="Wrap" Text="{Binding Path=Takimlar}"  Grid.Column="1" />
                            <Image Source="{Binding Path=LeftGole1}" Grid.Column="2" Width="20" HorizontalAlignment="Left" VerticalAlignment="Center" />
                            <TextBlock Text="{Binding Path=Iy}" Grid.Column="2" HorizontalAlignment="Center" />
                            <Image Source="{Binding Path=RightGole1}" HorizontalAlignment="Right"  Grid.Column="2" Width="20"  VerticalAlignment="Center"/>
                            <Image Source="{Binding Path=LeftGole2}" Grid.Column="3" HorizontalAlignment="Left"  Width="20"  VerticalAlignment="Center"/>
                            <TextBlock Text="{Binding Path=Ms}"  Grid.Column="3" HorizontalAlignment="Center" />
                            <Image Source="{Binding Path=RightGole2}" Grid.Column="3" Width="20" HorizontalAlignment="Right"   VerticalAlignment="Center"/>
                            <TextBlock Text="{Binding Path=Minute}"  Grid.Column="4" HorizontalAlignment="Center"/>

                        </Grid>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
            
        </Grid>

    </Grid>
</UserControl>
